package activity;

import org.w3c.dom.Text;

import csf.getmoney.BasicInfo;
import csf.getmoney.R;
import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class CheckInfoActivity extends Activity implements OnClickListener {

	Button btn_next;
	TextView tv_notPassVersion_content;
	
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_check_info);
		
		
		tv_notPassVersion_content = (TextView) findViewById(R.id.tv_notPassVersion_content);
		
		System.gc();
		btn_next = (Button) findViewById(R.id.btn_next);
		btn_next.setOnClickListener(this);
		
		
		
		if(BasicInfo.APPStatus.equals("1")){
			tv_notPassVersion_content.setText(BasicInfo.message_1);
			btn_next.setText(R.string.text_thanks);
		}else if(BasicInfo.APPStatus.equals("2")){
			tv_notPassVersion_content.setText(BasicInfo.message_2);
			btn_next.setText(R.string.text_goUpdate);
		}
	}


	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.btn_next:
			
			if(BasicInfo.APPStatus.equals("1")){
				finish();
			}else if(BasicInfo.APPStatus.equals("2")){
				Intent i = new Intent(Intent.ACTION_VIEW);
				Uri u = Uri.parse(BasicInfo.goUpDateURL);
				i.setData(u);
				startActivity(i);
			}
			break;

		}
		
	}
	


}
